pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    #[allow(unused_assignments)]
    let (mut a, mut b, mut c) = (0, 1, 1);
    if threshold < 1 {
        return 0;
    } else if threshold <= 2 {
        return 2;
    }
    let mut sum = 2;
    loop {
        a = b;
        b = c;
        c = a + b;
        if c < threshold {
            if c % 2 == 1 {
                sum += c;
            }
        } else {
            break;
        }
    }
    sum
}
